package com.tedu.day7.homework;

public class TestQuestion12 {
    public static void main(String[] args) {
        for (int i = 1; i < 3000; i++) {
            for (int j = i+1; j < 3000; j++) {
                if(isYinZi(i) == j && isYinZi(j) == i ){
                    System.out.println(i + "  " + j);
                }
            }
        }
    }
    public static int isYinZi(int n){
        int sum = 0;
        for (int i = 1; i <= n/2; i++) {
            if(n % i == 0){
                sum += i;
            }
        }
        return sum;
    }
}
